﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeBehind="Mail.aspx.cs" Inherits="MusicmanWeb.ADMIN.Mail" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
<script type="text/javascript" src="../js/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
      tinyMCE.init({
      mode : "textareas",
      elements: "mailcontent",
      theme : "advanced",
      cleanup : false,
      theme_advanced_toolbar_location : "top",
      theme_advanced_toolbar_align : "left",
      theme_advanced_path_location : "bottom",
      theme_advanced_resizing : true,
      theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull",
      theme_advanced_buttons2 : "formatselect,fontselect,fontsizeselect,|,cut,copy,paste,pastetext,|,undo,redo,|,link,unlink,code",
      theme_advanced_buttons3 : "",
      theme_advanced_buttons4 : "",
      forced_root_block : false,
      force_br_newlines : false,
      force_p_newlines : false,
      cleanup_on_startup : false,
      cleanup : false,
      verify_html : false,
      apply_source_formatting : false
      });
    </script>
    <!-- /TinyMCE -->


<div class="shim column"></div>
    <div class="page" id="home">
        <div id="sidebar">
         Sending options
         <asp:RadioButtonList ID="sedingRadio" runat="server" OnSelectedIndexChanged="sedingRadio_SelectedIndexChanged" AutoPostBack="true">
         <asp:ListItem Text="Subscribers" Selected="True" Value="subscribers" />
         <asp:ListItem Text="All users (not recomended)" Value="all"/>
         </asp:RadioButtonList>
         <asp:TextBox ID="emailtxt" runat="server"></asp:TextBox>
         <asp:LinkButton ID="add" runat="server" Text="add" CommandName="add" OnCommand="AddAdress_Command"/>
         <br />
         <asp:Label ID="erroLbl" runat="server" Visible="false" Text="Invalid email address"/>
         
         
         <label id="emailLbl" runat="server" />
         <asp:Repeater ID="emailsrepeater" 
                runat="server" 
                EnableViewState="true"
                OnItemDataBound="Emailsrepeater_ItemDataBound"
                OnItemCommand="Emailsrepeater_ItemCommand">
            <HeaderTemplate>
                 <table>
            </HeaderTemplate>
            <ItemTemplate>
            <tr>
                <td>
                    <asp:LinkButton ID="remove" runat="server" Text="remove" CommandName="remove" />
                </td>
                <td>
                    <label id="emailLbl" runat="server" />
                </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                    </table>
            </FooterTemplate>
         </asp:Repeater>
         
        </div>
        
        <div id="content">
            <label id="subjectlbl" runat="server" enableviewstate="false">
                Subject</label>
            <asp:TextBox ID="subjecttxt" runat="server" size="90" EnableViewState="false"/>
            <br />
            <br />
            <textarea id="mailcontent" runat="server" name="mailcontent" rows="10" cols="76"
                enableviewstate="false">
                      </textarea>
            <br />
            <asp:ImageButton ID="Update" runat="server" CssClass="button" SkinID="send" CausesValidation="true"
                OnCommand="Update_Button" />
                <br />
                <br />
            <asp:Label id="lblstatus" runat="server" enableviewstate="false"/>
                
        </div>
    </div>
</asp:Content>
